import React, { Component } from 'react'

export default class App extends Component {
    myref = React.createRef();
    render() {
    return (
      <div>
        <input ref={this.myref}></input>
        <button onClick={() => {
          console.log(this.myref.current.value)
        }}>输入的值是什么</button>
      </div>
    )
  }
}
